﻿using System;
using System.Collections.Generic;
using Terraria.GameInput;

namespace Terraria.ModLoader
{
	// Token: 0x020001DA RID: 474
	public class ModHotKey
	{
		// Token: 0x0600137C RID: 4988 RVA: 0x0000FECF File Offset: 0x0000E0CF
		internal ModHotKey(Mod mod, string name, string defaultKey)
		{
			this.mod = mod;
			this.name = name;
			this.defaultKey = defaultKey;
			this.displayName = mod.Name + ": " + name;
		}

		// Token: 0x0600137D RID: 4989 RVA: 0x0000FF03 File Offset: 0x0000E103
		public List<string> GetAssignedKeys(InputMode mode = InputMode.Keyboard)
		{
			return PlayerInput.CurrentProfile.InputModes[mode].KeyStatus[this.displayName];
		}

		// Token: 0x17000168 RID: 360
		// (get) Token: 0x0600137E RID: 4990 RVA: 0x0000FF25 File Offset: 0x0000E125
		public bool RetroCurrent
		{
			get
			{
				return !Main.drawingPlayerChat && Main.player[Main.myPlayer].talkNPC == -1 && Main.player[Main.myPlayer].sign == -1 && this.Current;
			}
		}

		// Token: 0x17000169 RID: 361
		// (get) Token: 0x0600137F RID: 4991 RVA: 0x0000FF5C File Offset: 0x0000E15C
		public bool Current
		{
			get
			{
				return PlayerInput.Triggers.Current.KeyStatus[this.displayName];
			}
		}

		// Token: 0x1700016A RID: 362
		// (get) Token: 0x06001380 RID: 4992 RVA: 0x0000FF78 File Offset: 0x0000E178
		public bool JustPressed
		{
			get
			{
				return PlayerInput.Triggers.JustPressed.KeyStatus[this.displayName];
			}
		}

		// Token: 0x1700016B RID: 363
		// (get) Token: 0x06001381 RID: 4993 RVA: 0x0000FF94 File Offset: 0x0000E194
		public bool JustReleased
		{
			get
			{
				return PlayerInput.Triggers.JustReleased.KeyStatus[this.displayName];
			}
		}

		// Token: 0x1700016C RID: 364
		// (get) Token: 0x06001382 RID: 4994 RVA: 0x0000FFB0 File Offset: 0x0000E1B0
		public bool Old
		{
			get
			{
				return PlayerInput.Triggers.Old.KeyStatus[this.displayName];
			}
		}

		// Token: 0x04001469 RID: 5225
		internal readonly Mod mod;

		// Token: 0x0400146A RID: 5226
		internal readonly string name;

		// Token: 0x0400146B RID: 5227
		internal readonly string displayName;

		// Token: 0x0400146C RID: 5228
		internal readonly string defaultKey;
	}
}
